package com.taoxi.system.service.impl;

import com.taoxi.common.utils.DateUtils;
import com.taoxi.system.domain.Customization;
import com.taoxi.system.mapper.CustomizationMapper;
import com.taoxi.system.service.ICustomizationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 定制单管理Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-10-09
 */
@Service
public class CustomizationServiceImpl implements ICustomizationService 
{
    @Autowired
    private CustomizationMapper customizationMapper;

    /**
     * 查询定制单管理
     * 
     * @param customId 定制单管理主键
     * @return 定制单管理
     */
    @Override
    public Customization selectCustomizationByCustomId(Long customId)
    {
        return customizationMapper.selectCustomizationByCustomId(customId);
    }

    /**
     * 查询定制单管理列表
     * 
     * @param customization 定制单管理
     * @return 定制单管理
     */
    @Override
    public List<Customization> selectCustomizationList(Customization customization)
    {
        return customizationMapper.selectCustomizationList(customization);
    }

    /**
     * 新增定制单管理
     * 
     * @param customization 定制单管理
     * @return 结果
     */
    @Override
    public int insertCustomization(Customization customization)
    {
        customization.setCreateTime(DateUtils.getNowDate());
        return customizationMapper.insertCustomization(customization);
    }

    /**
     * 修改定制单管理
     * 
     * @param customization 定制单管理
     * @return 结果
     */
    @Override
    public int updateCustomization(Customization customization)
    {
        customization.setUpdateTime(DateUtils.getNowDate());
        return customizationMapper.updateCustomization(customization);
    }

    /**
     * 批量删除定制单管理
     * 
     * @param customIds 需要删除的定制单管理主键
     * @return 结果
     */
    @Override
    public int deleteCustomizationByCustomIds(Long[] customIds)
    {
        return customizationMapper.deleteCustomizationByCustomIds(customIds);
    }

    /**
     * 删除定制单管理信息
     * 
     * @param customId 定制单管理主键
     * @return 结果
     */
    @Override
    public int deleteCustomizationByCustomId(Long customId)
    {
        return customizationMapper.deleteCustomizationByCustomId(customId);
    }
}
